import request from '@/utils/request'

// 病虫害检测
export function detectPest(data) {
  return request({
    url: '/pest/detection/detect',
    method: 'post',
    data: data,
    headers: {
      'Content-Type': 'multipart/form-data'
    },
    timeout: 60000 // 60秒超时，因为图片处理可能较慢
  })
}

// 健康检查
export function checkHealth() {
  return request({
    url: '/pest/detection/health',
    method: 'get'
  })
}

// 测试检测功能
export function testDetection() {
  return request({
    url: '/pest/detection/test',
    method: 'get'
  })
}
